package com.itheima.mapper.admin;

import com.itheima.pojo.admin.Employee;
import com.itheima.pojo.admin.EmployeeById;
import com.itheima.pojo.admin.EmployeePagination;
import com.itheima.pojo.admin.Login;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ChenJunJie
 * @date 2022/6/11 14:53
 */
@Mapper
public interface EmployeeMapper {

    //新增员工(注册)
    int employeeAdd(Employee employee);

    //查询当前用户名是否存在
    Employee employeeSelectByUsername(Employee employee);

    //登录
    Login login(Employee employee);

    //员工分页查询
    List<EmployeePagination> employeePaginationByName(@Param("name") String name, @Param("page") Integer page , @Param("pageSize") Integer pageSize);

    //通过姓名查询员工
    List<EmployeePagination> employeeSelectByName(@Param("name") String name);

    //通过员工id查询员工
    EmployeeById employeeSelectById(@Param("id") String id);

    //通过员工id修改员工内容
    int employeeUpdateById(EmployeeById employeeById);


}
